package com.qiangesoft.blog.system.pojo.dto;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import java.util.List;

/**
 * @author qiange
 * @date 2023-06-01
 */
@ApiModel("用户信息")
@Data
public class UserSaveDTO {

    @NotBlank(message = "用户名不能为空")
    @ApiModelProperty("用户名")
    private String username;

    @NotBlank(message = "昵称不能为空")
    @ApiModelProperty("昵称")
    private String nickname;

    @ApiModelProperty("手机号")
    private String phoneNumber;

    @NotBlank(message = "邮箱不能为空")
    @ApiModelProperty("邮箱")
    private String email;

    @NotNull(message = "性别不能为空")
    @ApiModelProperty("性别：0男 1女 2未知")
    private Integer sex;

    @NotNull(message = "状态不能为空")
    @ApiModelProperty("状态：0禁用 1正常")
    private Boolean state;

    @ApiModelProperty("头像")
    private String avatar;

    @ApiModelProperty("简介")
    private String intro;

    @ApiModelProperty("个人网站")
    private String webSite;

    @NotEmpty(message = "角色不能为空")
    @ApiModelProperty("角色id")
    private List<Long> roleIdList;
}
